package models;

import javax.persistence.*;

import play.db.jpa.Model;
import play.data.validation.*;

@Entity
public class Person extends Model {
	
	@Required(message="Field is required")
	public String lastName;
	
	@Required(message="Field is required")
	public String firstName;
	
	@Required(message="Field is required")
	@Unique(message="This e-mail address is already registered")
	@Email(message="This is not a valid e-mail address")
	public String email;
	
	public Person(String lastName, String firstName, String email) {
		super();
		this.lastName = lastName;
		this.firstName = firstName;
		this.email = email;
	}
}
